﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SocialMedia.Infrastructure.Repositories;

namespace SocialMedia.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class PostController : ControllerBase
    {

        [HttpGet]
        public IActionResult GetPosts()
        {
            PostRepository postRepository = new PostRepository();
            var posts = postRepository.GetPosts();
            return Ok(posts);
        }



    }
}
